Skip to content

Add args column to view backing tables#5300

Merged
joshua-spacetime merged 1 commit into
masterfrom
joshua/view-table-with-args
Jun 16, 2026
Merged

Add args column to view backing tables#5300
joshua-spacetime merged 1 commit into
masterfrom
joshua/view-table-with-args

Conversation

@joshua-spacetime

@joshua-spacetime joshua-spacetime commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Review #5287 first.

This patch updates view backing table schemas to have a single private column arg_hash. Previously sender-scoped views had a sender column for the calling identity, however now that's been replaced with a single unified arg_hash column that encodes the calling identity within it.

When we add parameterized views, the view args will also be encoded in this hash and stored in this column.

This column exists for both anonymous and sender scoped views meaning that the backing tables for all views now have the same number of private columns - one.

This hash is now used as a runtime variable that the query engine uses to evaluate view table scans.

In order to keep the diff small, this patch does update view read sets with this new hash value. That change has a larger blast radius and will be done in the next set of changes.

API and ABI breaking changes

N/A

Expected complexity level and risk

2

Testing

Existing coverage.

@kistz kistz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very nice!
Hashing is correctly encapsulated and all call sites use the appropriate methods as far as i saw :>

Comment thread crates/physical-plan/src/plan.rs
Comment thread crates/schema/src/schema.rs
Comment thread crates/core/src/db/relational_db.rs
Comment thread crates/datastore/src/locking_tx_datastore/mut_tx.rs
Base automatically changed from joshua/params-and-bind-vars to master June 15, 2026 23:26
@joshua-spacetime joshua-spacetime force-pushed the joshua/view-table-with-args branch from 9023063 to e9a766c Compare June 16, 2026 00:07
@joshua-spacetime joshua-spacetime added this pull request to the merge queue Jun 16, 2026
Merged via the queue into master with commit a2ca083 Jun 16, 2026
33 checks passed
@joshua-spacetime joshua-spacetime deleted the joshua/view-table-with-args branch June 16, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants